home *** CD-ROM | disk | FTP | other *** search
/ Group 42-Sells Out! - The Information Archive / Group 42 Sells Out (Group 42) (1996).iso / commun / scanner / dtmf_d.txt < prev    next >
Text File  |  1994-09-18  |  5KB  |  138 lines

  1. DTMF decoder DEMO version
  2. Shima-nized Advanced Utilities - J.M. Shima
  3. ===========================================
  4.  
  5.  
  6. INTRODUCTION
  7. ------------
  8.  
  9. * This program is capable of decoding DTMF tones from a given input file
  10.   that has been sampled at a 8kHz sampling rate.
  11. * The source file has to be binary or a Soundblaster 8-bit .VOC file.
  12.  
  13. * This program accepts COMMAND-LINE ARGUMENTS that are passed to the
  14.   DTMF decoder.
  15. * For a list of the arguments, type DTMF_D at the DOS prompt.
  16. * The DEMO only decodes a maximum of 5 numbers.  Interested
  17.   persons can receive the full-blown version with no limitations.
  18. * An example of the input arguments are:
  19.  
  20.  
  21. Usage:  DTMF_D <in_file> <thresh> <sblast>
  22.  
  23. <in_file> --> input sound file name.
  24.  
  25. <thresh> -->  The threshold that the DTMF tones must exceed over the
  26.               noise floor for detection (in dB).  Typically, strong
  27.               DTMF tones will be 20-40 dB stronger than the noise
  28.               in the signal.  However, noisy signals lower this
  29.               signal-to-noise (S/N) ratio.  The threshold parameter
  30.               allows the user to set the S/N threshold for detection.
  31.               NOTE:  If nothing is entered, then the default thresh value
  32.               is 20dB.
  33.  
  34. <sblast> --> Set to this to a 1 for a Sounblaster .VOC file, else set
  35.              it to 0.  NOTE: If nothing is entered, the default is 1, i.e.
  36.              a .VOC file is selected.
  37.  
  38.  
  39. IMPORTANT NOTES BEFORE USE
  40. --------------------------
  41.  
  42. ** For the DEMO program, your input .VOC or binary file * MUST BE SAMPLED *
  43.    at a 8kHz rate (no exceptions) for correct results.
  44.    The industry standard for DTMF sampling is 8kHz, and this demo program
  45.    uses that sample rate in its calculations!!
  46.  
  47.  
  48. EXAMPLES of running DTMF_D:
  49. ---------------------------
  50.  
  51. DTMF_D dtmf800.voc 25 1   --> input file is dtmf800.voc, threshold S/N
  52.                               ratio is 25dB, soundblaster .VOC file type is
  53.                               selected.
  54.  
  55. DTMF_D dtmf800.voc        --> input file is dtmf800.voc, threshold DEFAULTS
  56.                               to 20dB S/N ratio, soundblaster file type
  57.                               is selected by DEFAULT.
  58.  
  59. DTMF_D junk.dat 20 0      --> input file is junk.dat, thresh=20dB, binary
  60.                               file type is selected.
  61.  
  62.  
  63. INCLUDED FILES:
  64. ---------------
  65.  
  66. DTMF_D.EXE   -->  DTMF demo decoder.
  67. DTMF800.VOC  -->  DTMF number 1-800-555-1212 stored in a .VOC file.
  68. DTMF_D.DOC   -->  This file.
  69.  
  70.  
  71. REGISTRATION
  72. ------------
  73.  
  74. The enhanced version of this program allows unlimited decoding of numbers,
  75. and will offer other features.
  76. I am in the works of adding options such as:
  77.  
  78. 1) logging the decoded numbers to a file.
  79.  
  80. 2) allowing a list of files to be inputted, so uninterrupted decoding and
  81.    logging happens without user intervention.
  82.  
  83. ** REGISTERED users will also receive a DTMF generator program.  This is
  84.    a DTMF tone generator which allows you to create any DTMF sequence
  85.    you wish.  The program allows you to specify a DTMF number sequence,
  86.    the sampling rate, and how long you want the pulses to be (in samples).
  87.  
  88.  
  89. LICENSE
  90. -------
  91.  
  92. The DEMO version of the DTMF decoder is shareware, and is free to be
  93. used for personal use only.  This is true as long as the DEMO is
  94. not alterted in any fashion.  Registered users will receive the enhanced
  95. version of the DTMF decoder and will receive documentation stating such.
  96.  
  97. I have thoroughly tested this code and am not responsible for any mishaps
  98. that may happen when launched on your computer.  The code was tested on
  99. a IBM compatible 25MHz 386DX with a Soundblaster Ver. 1.5, 8-bit sound card.
  100. Every action has been taken to ensure an error-free program.
  101.  
  102. Use this program at your own risk, as I assume no responsibility in your
  103. actions while you are using this program.  Invoking the program is your
  104. compliance to this statement.
  105.  
  106.  
  107. Good luck!
  108.  
  109. For more information,  email: shima@eel.ufl.edu
  110.  
  111. For registration, see the DEMO screen.  Specify floppy size.
  112.  
  113.  
  114. Algorithm background:
  115. =====================
  116.  
  117. DTMF_D performs a Fast-Fourier Transform (FFT) on the incoming data stream
  118. acquired from the input sound file.
  119. The FFT transforms time-domain data into frequency-domain data.
  120. Before the FFTs are performed, the input data is also windowed with a Hamming
  121. window in order to reduce side-lobe leakage in the frequency domain.
  122.  
  123. A nonparametric spectral estimation method known as the Welch
  124. method (50% overlap) is performed via the FFT and the DTMF frequencies
  125. are monitored for activity.  The analysis is computationally expensive
  126. because overlapping FFTs must be performed to reduce spectral variance
  127. and perform a smoothing operation through spectral averaging.  Also, the
  128. noise floor is recalculated with every FFT and the threshold is adaptively
  129. calculated in order to reduce false detection of DTMF tones.
  130.  
  131. Since DTMF tones are at least 50-65ms long, and can be as long as 255ms, the
  132. FFT must have enough spectral resolution to decipher the DTMF frequencies.
  133. Thus, with the standard 8kHz sample rate used in industry, a
  134. 256-pt. FFT gives spectral resolution of 8kHz / 256 = 31.25 Hz.  This is
  135. enough resolution to resolve all DTMF frequencies since the closest freqs.
  136. are around 100 Hz apart.
  137.  
  138.